package com.zhangtai.modules.service.performance;

import com.zhangtai.modules.entity.performance.PerformanceUnitManagementEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 单位绩效管理
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-12-22 16:56:48
 */

public interface PerformanceUnitManagementService {

    @GetMapping("/findPerformanceUnitManagementList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage( @RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                          @RequestParam(value = "assessmentYear", required = false) String assessmentYear,
                         @RequestParam(value = "name",  required = false) String name,
                         @RequestParam(value = "assessmentCycle",  required = false) Integer assessmentCycle,
                         @RequestParam(value = "performanceName",  required = false) String performanceName,
                          @RequestParam(value = "approveStatus", required = false) List<Integer> approveStatus,
                          @RequestParam(value = "status", required = false) Integer status,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoPerformanceUnitManagement")
    @ApiOperation(value = "根据id查找")
    PerformanceUnitManagementEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/savePerformanceUnitManagement")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody PerformanceUnitManagementEntity entity);

    @PostMapping("/updatePerformanceUnitManagement")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody PerformanceUnitManagementEntity entity);

    @GetMapping("/deleteOnePerformanceUnitManagement")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deletePerformanceUnitManagements")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

